<?PHP
require_once('classes/classAyNoMemes.php');

$ayNoMemes = new ayNoMemes();


if($_GET["id"]){
    $ayNoMemes->delAyNoMeme($_GET["id"]);
}

$arrMemes = $ayNoMemes->getLast20AyNoMemes();
?>
<form action="" method="post" name="frmDelNotas">
    <table width="100%" border="1" cellspacing="2" cellpadding="4">
        <tr class="tablaEditor">
            <td>&nbsp;</td>
            <td>Descripci&oacute;n</td>
            <td>Fecha de Publicaci&oacute;n</td>
        </tr>
        <?PHP
        for($i=0; $i<sizeof($arrMemes); $i++){

            if($i%2==0){
                $sRows .= "<tr class='evenRow'>";
            }
            else{
                $sRows .= "<tr class='oddRow'>";
            }

            $sRows .= "<td><a href=\"Editor.php?AX=10&BX=20&id="
                .$arrMemes[$i]["id"]."\">Borrar</a></td>
		    <td>".$arrMemes[$i]["descripcion"]."</td>
		    <td>".$arrMemes[$i]["fechaPublicacion"]."</td>
		  </tr>";
        }

        echo $sRows;
        ?>
        <tr>
            <td colspan="4">&nbsp;</td>
        </tr>
    </table>
</form>